<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查看</title>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>

<h1 class="page-header">留言反馈</h1>


<form action="" method="POST" form-ajax forward="/liuyan">
    <div class="radio">
        <label>
            <input type="radio" name="target" id="optionsRadios1" value="option1" checked>
            给
            <#if me.type='student'>
                <input type="hidden" name="type" value="st"/>
            <select class="form-control" name="toUser">
                <#list teachers as i>
                    <option value="${i.id}">${i.name}</option>
                </#list>
            </select>
            </#if>
            <#if me.type='teacher'>
                <input type="hidden" name="type" value="ts"/>
            <select class="form-control" name="toUser">
                <#list students as i>
                    <option value="${i.id}">${i.name}</option>
                </#list>
            </select>
            </#if>

            留言
        </label>
    </div>
    <div class="radio">
        <label>
            <input type="radio" name="target" id="optionsRadios2" value="option2">
            给系统管理员留言
        </label>
    </div>
    <#--<div class="form-group">
        <label for="exampleInputEmail1">标题</label>
        <input type="text" class="form-control" id="exampleInputEmail1" placeholder="" name="title">
    </div>-->

    <div class="form-group">
        <label for="exampleInputPassword1">内容</label>
        <textarea rows="" cols="" class="form-control" name="content"></textarea>
    </div>

    <button type="submit" class="btn btn-default">提交</button>
</form>

<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/laypage/laypage.js"></script>
<script type="text/javascript" src="/static/js/form-ajax.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.validate.min.js"></script>
<script type="text/javascript">
    function toggleSelectAll(self,$sel){
        if(self.checked)
            $sel.each(function(){
                if(!this.checked) $(this).click();
            });
        else{
            $sel.each(function(){
                if(this.checked) $(this).click();
            });
        }
    }
    function del(id){
        if(confirm('确认删除此记录？'))
            $.post('/user/del',{
                id:id
            },function(data){
                if(data){
                    alert('操作成功');location.reload();
                }
                else{
                    alert('操作失败')
                }
            },'json');
    }
</script>
</body>
</html>